﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Report.aspx.cs" Inherits="Web.Report" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="css/web.css" type="text/css" rel="stylesheet" media="screen" />
    <link href="js/boxy/stylesheets/boxy.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="js/boxy/javascripts/jquery.boxy.js" type="text/javascript"></script>
    <script src="js/module.js" type="text/javascript"></script>
</head>
<body class="home">
    <form id="form1" runat="server">
    <div id="home_guest">
      <h1 class="logo"><strong>学科评价报告</strong><em>北京市海淀区义务教育（小学）基础学科</em></h1>
      <div class="module_form">
		    <p><label>学生学号：</label><span><input type="text" class="form_text" id="studentnum"/></span></p>
		    <p><label>查询密码：</label><span><input type="text" class="form_text" id="pass" /></span></p>
		    <p class="form-foot">
		    <input type="button" class="form_button_ck" value="查看报告" id="QueryReport"/>
		    </p>
		    <p>您还没有查询密码？<a href="javascript:void(0)" onclick='javascript:ShowIframe("SendOrder.aspx","在线支付",600,500);'>点此购买</a></p>
	    </div>
      <div class="foot">海淀区课业诊断项目组  技术支持</div>
    </div>
    </form>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#QueryReport").bind("click", function() {
                if ($("#studentnum").val() != "" && $("#pass").val() != "") {
                    $.ajax({
                        type: "POST",
                        contentType: "application/json",
                        url: "Report.aspx/GetQuery",
                        data: "{studentnum:\"" + $("#studentnum").val() + "\",pass:\"" + $("#pass").val() + "\"}",
                        dataType: 'json',
                        success: function(result) {
                            var strJson = result.d;
                            if (strJson != null) {
                                var dataObj = eval("(" + strJson + ")");
                                if (dataObj.Status == "Sucess") {
                                    ShowIframe("ReportExamList.aspx", "考试列表", 400, 300);
                                }
                                else if (dataObj.Status == "Error") {
                                    alert(dataObj.Msg);
                                }
                            }
                        }
                    });
                }
                else {
                    alert("学号或查询密码不能为空！");
                }
            });
        });
    </script>
</body>
</html>
